package com.mangocity.airticket.b2b.webservice;

public class FlightQueryServiceProxy implements com.mangocity.airticket.b2b.webservice.FlightQueryService {
  private String _endpoint = null;
  private com.mangocity.airticket.b2b.webservice.FlightQueryService flightQueryService = null;
  
  public FlightQueryServiceProxy() {
    _initFlightQueryServiceProxy();
  }
  
  public FlightQueryServiceProxy(String endpoint) {
    _endpoint = endpoint;
    _initFlightQueryServiceProxy();
  }
  
  private void _initFlightQueryServiceProxy() {
    try {
      flightQueryService = (new com.mangocity.airticket.jingdong.webservice.FlightQueryServiceImplServiceLocator()).getFlightQueryServiceImplPort();
      if (flightQueryService != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)flightQueryService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)flightQueryService)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (flightQueryService != null)
      ((javax.xml.rpc.Stub)flightQueryService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.mangocity.airticket.b2b.webservice.FlightQueryService getFlightQueryService() {
    if (flightQueryService == null)
      _initFlightQueryServiceProxy();
    return flightQueryService;
  }
  
  public com.mangocity.airticket.b2b.webservice.FlightQueryInfoResponse query(com.mangocity.airticket.b2b.webservice.FlightQuery parameters) throws java.rmi.RemoteException{
    if (flightQueryService == null)
      _initFlightQueryServiceProxy();
    return flightQueryService.query(parameters);
  }
  
  
}